package org.raymond.iworks.study.basic.designpattern.principle.singleresponsibility;

public class SingleResponsibility3 {
    public static void main(String[] args) {
        Vehicle3 vehicle = new Vehicle3();
        vehicle.runRoad("摩托车");
        vehicle.runWater("轮船");
        vehicle.runAir("飞机");
    }
}

class Vehicle3 {
    public void runRoad(String vehicle){
        System.out.println(vehicle+"在公路上运行");
    }
    public void runAir(String vehicle){
        System.out.println(vehicle+"在空中运行");
    }
    public void runWater(String vehicle){
        System.out.println(vehicle+"在水面上运行");
    }
}
